package com.imooc.sell.enums;

import lombok.Getter;

@Getter
public enum ErrorEnum {
    PARAM_ERROR(1, "参数错误"),
    USER_NOT_FOUND(2, "未查找到指定openid用户"),
    PRODUCT_NOT_FOUND(3, "未查找到指定商品"),
    PRODUCT_STOCK_NOT_ENOUGH(4, "商品库存不足"),
    ORDER_STATUS_ERROR(5, "订单状态错误"),
    ORDER_STATUS_UPDATE_FAIL(6, "订单状态更新失败"),
    ORDER_DETAIL_NULL(7, "订单详情为空"),
    ORDER_NOT_EXIST(8, "订单不存在"),
    PAY_STATUS_ERROR(9, "支付状态不正确"),
    PAY_STATUS_UPDATE_FAIL(10, "支付状态更新失败"),
    PRODUCT_ID_IS_NULL(11, "订单id为空");

    private Integer code;
    private String msg;

    ErrorEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
